class AddRolesToCommunity < ActiveRecord::Migration
  def self.up
  	add_column :communities, :member_access_type_id, :integer, :default=>AccessType::ALLOW_ALL
  	add_column :communities, :write_access_type_id, :integer, :default=>AccessType::ALLOW_ALL
  	add_column :communities, :public_access_type_id, :integer, :default=>AccessType::ALLOW_ALL
  	add_column :communities, :for_adults, :boolean, :default=>false
  	add_column :posts, :is_visible, :boolean, :default=>true
  end

  def self.down
  	remove_column :communities, :member_access_type_id
  	remove_column :communities, :write_access_type_id
  	remove_column :communities, :public_access_type_id
  	remove_column :communities, :for_adults
  	remove_column :posts, :is_visible
  end
end
